<?php
class OrderForm extends CFormModel
{
	public $name;
	public $country;
	public $company;
	public $address;
	public $contactNumber;
	public $email;
	public $hearUsFrom;
	public $profession;
	public $jobCriteria;
	public $verifyCode;
	public $subject;
	
	/**
	 * Declare validation rules 
	 */
	
	public function rules()
	{
		return array(
			// Field form name, country, address, contact number, email, job criteria are required
			array('name, country, address, contactNumber, email, profession, jobCriteria', 'required' ),
			// email has to be valid email address
			array('company, hearUsFrom', 'length', 'max'=>128),
			array('email', 'email'),
			array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
		);
		}
	public function attributeLabels()
	{
		return array(
			'verifyCode'=>'Kode Verifikasi :',
			'subject'=>'Perihal :',
			'company'=>'Perusahaan',
			'name'=>'Nama :',
			'country'=>'Negara :',
			'address'=>'Alamat :',
			'contactNumber'=>'Nomor Kontak :',
			'email'=>'Alamat Email :',
			'profession'=>'Profesi :',
			'jobCriteria'=>'Jelaskan kriteria pekerja yang Anda butuhkan :',
			'hearUsFrom'=>'Bagaimana Anda mendengar tentang kami? ',			
		);
		}
	}
?>
